var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var ObjectId  = Schema.ObjectId;
var DatasetSchema = Schema({
  title: String,
  url: String,
  content: String,
  description: String,
  edited_at: {type:Date, default: Date.now},
  scene: String,
  freq: String,
  sendnum: Number,
  recnum: Number,
  time: String,
  comments: [{type:Schema.Types.ObjectId, ref: "Comment"}],
})

var Dataset = mongoose.model('Dataset', DatasetSchema)

var ShowcaseSchema = Schema({
  name: String,
  cheatsheets: [{type:Schema.Types.ObjectId, ref: 'Cheatsheet'}]
})
var Showcase = mongoose.model('Showcase', ShowcaseSchema)
